import { defineStore } from 'pinia'

export const useModal = defineStore('modal', {
  state: () => {
    return {
      isShow: false,
      type: '',
    }
  },
  actions: {
    open({ type }) {
      this.type = type
      this.isShow = true
    },
    close() {
      this.isShow = false
    },
  },
})
